﻿using System.Collections.Generic;

namespace SharpTag.ID3
{
    /// <summary>
    /// Interface representing a Header found in a Tag.
    /// </summary>
    public interface ITagHeader : IPreparable, IModifiable
    {
        /// <summary>
        /// Gets the Identifier of the Tag.
        /// </summary>
        string Identifier
        {
            get;
        }

        /// <summary>
        /// Gets the Version of the Tag.
        /// </summary>
        double Version
        {
            get;
        }

        /// <summary>
        /// Gets the Size of the Tag.
        /// </summary>
        long Size
        {
            get;
        }

        /// <summary>
        /// Gets a list of <see cref="TagHeaderFlag"/> objects of the Tag.
        /// </summary>
        List<TagHeaderFlag> Flags
        {
            get;
        }

        /// <summary>
        /// Adds a <see cref="TagHeaderFlag"/> object to the Header.
        /// </summary>
        /// <param name="flag">A <see cref="TagHeaderFlag"/> object.</param>
        void AddFlag(TagHeaderFlag flag);

        /// <summary>
        /// Removes a <see cref="TagHeaderFlag"/> object from the Header.
        /// </summary>
        /// <param name="flag">An <see cref="TagHeaderFlag"/> object.</param>
        void RemoveFlag(TagHeaderFlag flag);

        /// <summary>
        /// Creates a Footer that is a duplicate of the Header.
        /// </summary>
        /// <returns></returns>
        ITagFooter CreateFooter();

        /// <summary>
        /// Parses the raw header bytes and populates the ITagHeader object.
        /// </summary>
        /// <param name="headerBytes">The raw byte array containing the header data.</param>
        void ParseHeaderData(byte[] headerBytes);
    }
}
